package com.webapi.core.model.persist;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "tb_request_log")
public class RequestLog extends Base implements Serializable {

	private static final long serialVersionUID = -2999707690313278081L;

	@Column(name = "code", length = 10, nullable = false)
	private String code;

	@Column(name = "ip", length = 20, nullable = false)
	private String ip;

	@Column(name = "category", length = 20, nullable = false)
	private String category;

	@Column(name = "method", length = 20, nullable = false)
	private String method;

	@Column(name = "type", length = 60, nullable = false)
	private String type;

	@Column(name = "data")
	private String data;

	@Column(name = "uri", nullable = false)
	private String uri;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getData() {
		return data;
	}

	public void setData(String data) {
		this.data = data;
	}

	public String getUri() {
		return uri;
	}

	public void setUri(String uri) {
		this.uri = uri;
	}

	@Override
	public String toString() {
		return "RequestLog [code=" + code + ", ip=" + ip + ", category="
				+ category + ", method=" + method + ", type=" + type
				+ ", data=" + data + ", uri=" + uri + ", getId()=" + getId()
				+ ", getCreateTime()=" + getCreateTime() + "]";
	}

}
